package com.clkj.xiuzheng.dao;

import com.clkj.xiuzheng.pojo.Company;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface CompanyMapper extends Mapper<Company> {

    @Update("update t_cl_company set company_status = 0 where company_id = #{companyId}")
    void updateCompanyDownById(Integer companyId);
    @Update("update t_cl_company set company_status = 1 where company_id = #{companyId}")
    void updateCompanyUp(Integer companyId);
    @Select("select company_id,company_name,company_status,company_remark from t_cl_company")
    List<Company> listCompany();
    @Select("select * from t_cl_company where company_name like '%${companyByName}%' ")
    List<Company> getCompanyByName(@Param("companyByName") String companyByName);
}
